const {myPromise} = require('../dbs/myPromise')


exports.getblog =async (req,res)=>{
    const sql = 'select * from blogs'

    const results = await myPromise(sql)
    // console.log(results);
    res.send({
        status:201,
        message:'获取数据成功',
        data:results
    })
}